def is_odd(n):
    return n % 2 == 1
def is_name(n):
    # print(n)
    # return n['name'] == "小王"
    return (n['name'] == "小王") | (n['name'] == "小王1")

if __name__ == '__main__':
    # tmplist = filter(is_odd, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
    # newlist = list(tmplist)
    # print(newlist)
    # sites = ["Baidu", "Google", "Runoob", "Taobao"]
    # sitesObjs = [{"name": "小王"}, {"name": "男"}, {"name": "male"}, {"name": "20"}]
    sitesObjs1 = [{ "list": [{"name": "小王"}, {"name": "男"}, {"name": "male"}, {"name": "20"}]},
                  { "list": [{"name": "小王1"}, {"name": "男"}, {"name": "male"}, {"name": "20"}]}]

    # print(list(filter(lambda x: x["name"] == "小王", _['list']) for _ in sitesObjs1))
    print(len([list(filter(is_name, _['list'])) for _ in sitesObjs1]))
    # for site in sites:
    #     if site == "Runoob":
    #         print("菜鸟教程!")
    #         break
    #     print("循环数据 " + site)
    # else:
    #     print("没有循环数据!")
    # print("完成循环!")
    list1 = ['Google', 'Runoob', 'Taobao']
    print (len(list1))
    list2=list(range(5)) # 创建一个 0-4 的列表
    print (len(list2))
    input()